package com.guinea.system.dao;

import java.util.List;
import com.guinea.core.orm.HibernateDao;
import com.guinea.system.entity.ResRoleRel;

public class ResRoleRelDao extends HibernateDao {

	public Class getEntityClass() {
		return ResRoleRel.class;
	}

	public List getByRoleResource(Long roleId, Long resourceId) {
		return find(
				"select e from ResRoleRel e where e.status = '1' and e.role.id = ? and e.resource.id = ?",
				new Object[] { roleId, resourceId });
	}
	
}
